home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / EffectDiscShapeOfTheBeast.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  2.3 KB  |  55 lines

  1. public class EffectDiscShapeOfTheBeast extends Codex {
  2.    private static final int TIMER_ID_WOLF = 0;
  3.    private int _shifterGuid;
  4.  
  5.    void EffectEnded() {
  6.       CodexActor shifter = new CodexActor(this._shifterGuid);
  7.       shifter.ActorEndShapeShift();
  8.       ((CodexThing)shifter).SetShell("shellSprite_white", 20480, 0.0F, 2.0F, 1.0F, 1.0F);
  9.       ((CodexThing)shifter).SetAlpha(0.0F);
  10.       ((CodexThing)shifter).SetAlpha(1.0F, 2000.0F);
  11.       shifter.StopActorAction();
  12.       shifter.ClearActorFlags(4194312);
  13.       shifter.RemoveActorEffect("ef_disc_shapeofthebeast2");
  14.       shifter.RemoveActorEffect("ef_disc_shapeofthebeast3");
  15.    }
  16.  
  17.    public void restore(int flags) {
  18.       this._shifterGuid = CodexSequence.RestoreInt();
  19.    }
  20.  
  21.    public void effectstarted(int actorGuid, int effectGuid, int creatorGuid, int duration) {
  22.       this._shifterGuid = actorGuid;
  23.       CodexActor shifter = new CodexActor(this._shifterGuid);
  24.       ((Codex)this).CaptureThing(this._shifterGuid);
  25.       ((CodexThing)shifter).SetAlpha(0.0F, 1500.0F);
  26.       float len = (float)(((CodexThing)shifter).PlayMotionSetMode(168, false, 30.0F) / 1000);
  27.       ((Codex)this).SetTimer(len, 0);
  28.       shifter.SetActorFlags(4194312);
  29.    }
  30.  
  31.    public void killed(int guid, int causeID, int captureID) {
  32.       this.EffectEnded();
  33.    }
  34.  
  35.    public void save(int flags) {
  36.       CodexSequence.SaveInt(this._shifterGuid);
  37.    }
  38.  
  39.    public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
  40.       switch (timerID) {
  41.          case 0:
  42.             CodexActor shifter = new CodexActor(this._shifterGuid);
  43.             shifter.ActorShapeShift(shifter.GetActorClanShapeTemplate(), 0);
  44.             ((CodexThing)shifter).SetAlpha(0.0F);
  45.             ((CodexThing)shifter).SetAlpha(1.0F, 2000.0F);
  46.             shifter.StopActorAction();
  47.          default:
  48.       }
  49.    }
  50.  
  51.    public void effectended(int actorGuid, int effectGuid, int creatorGuid, int reason) {
  52.       this.EffectEnded();
  53.    }
  54. }
  55.